<template>
  <div id="app">
    <!-- 使用router-link来导航渲染路由 -->
    <!-- <router-link to='/Login'>登陆</router-link>
    <router-link to='/Register'>注册</router-link> -->
    <van-nav-bar title="标题" left-text="返回" right-text="按钮" left-arrow @click-left="onClickLeft" @click-right="onClickRight"  fixed/>

    <van-tabbar v-model="active">
      <van-tabbar-item icon="chat" to='/Chat'>标签</van-tabbar-item>
      <van-tabbar-item icon="contact" dot to='/Contact'>标签</van-tabbar-item>
      <van-tabbar-item icon="home" info="5" to='/Records'>标签</van-tabbar-item>
      <van-tabbar-item icon="points-mall" info="20" to='/Gold'>标签</van-tabbar-item>
    </van-tabbar>

    <router-view></router-view>
  </div>
</template>

<script>
// export default {
//   data: () => ({
//     msg: "这是父组件的数据"
//   })
// };
// var vm = new Vue({
//   el:'#app',
//   data:{

//   },
//   methods:{

//   }
// })
export default {
  // es5和es6相互存在的写法
  data: () => ({
    active:0,
  }),
 
  methods: {
    onClickLeft() {
      console.log("返回");
    },
    onClickRight() {
      console.log("按钮");
    }
  }
};
</script>

<style  scoped>
</style>